package region

import (
	"gitee.com/krio/grpc-go-server/dao/model"
	"gitee.com/krio/grpc-go-server/dao/model/common"
)

func (*Region) TableName() string {
	return model.TableRegion
}

// 高德：https://lbs.amap.com/api/javascript-api/download
type Region struct {
	*common.AutoincrID `xorm:"extends"`
	Name               string `xorm:"not null comment('名称')"`
	Adcode             int32  `xorm:"not null  unique(adcode) comment('行政区编码')"`
	CityCode           string `xorm:"comment('城市编码')"`
	Pcode              int32  `xorm:"not null default(0) comment('父级CODE')"`
	Level              int32  `xorm:"not null default(0) comment('层级')"`
}
